package receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import application.UIApplication;

/**
 * Created by yanglei on 15/9/27.
 */
public abstract class FileChooserReceiver extends BroadcastReceiver {
    public static final String Action = UIApplication.PackageName+".Receiver.FileChooser";
    @Override
    public void onReceive(Context context, Intent intent) {
        if (Action.equals(intent.getAction())){
            String fileFullName = intent.getStringExtra("fileFullName");
            FileChooser(context, intent, fileFullName);
        }
    }

    /**
     * 有一个文件被选中了
     * @param context
     * @param intent
     * @param fileFullName 返回被选中文件的完整路径
     */
    public abstract void FileChooser(Context context, Intent intent,String fileFullName);
}
